export default ({type,url,image}:{type:'url'|'image',url: string,image?: string})=>{
  return (
    <>
      {
        type==='url' && <iframe style={{height:250,width:'100%'}} frameBorder={0} src={url}></iframe>
      }
      {
        type==='image' && (<div style={{background:'#fff',padding:8,marginTop:16,width:'100%'}}><a href={url} target="_blank" rel="nofollow sponsored"><img style={{borderRadius:4}} src={image} alt="Trae" width="100%"   className="rounded"/></a></div>)
      }
    </>
  )
}
